/*
 * This file is part of shared-drawing.
 * shared-drawing is free software: you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option )
 * any later version. shared-drawing is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details.
 * You should have received a copy of the GNU General Public License along with 
 * shared-drawing. If not, see http://www.gnu.org/licenses/.
 */

package shapes;

import primitives.P_Line;
import SharedDrawing.TwoCornersShape;

public class Line extends TwoCornersShape
{
    //add here all your primitives
    private P_Line obj;

    public Line()
    {
        //creat all and add to the parent's collection
    	obj = new P_Line();
        m_composingElements.add(obj);
    }

    @Override
    public void setShape() 
    {
        //call it if you want to have the corners drawn
        setCorners();
        //set the shape depending on the position and the size
        obj.setShape(m_p1.x, m_p1.y, m_p2.x, m_p2.y);
    }
}
